<template>
	<view class="zwds-content-box" v-if="hasResult">
		<view class="result-content">
			<view class="page-header">
				<img class="page-header-img" src="@/static/images/synthesis/zwdsResult/result_1.png" alt="紫微斗数">
			</view>
      <view class="zwds-divide">
        <img class="dd-img" src="@/static/images/synthesis/zwdsResult/divide.png">
        <view class="dd-content">
          <img class="dd-deco" src="@/static/images/synthesis/zwdsResult/left.png">
          <view class="dd-title">紫薇主星</view>
          <img class="dd-deco" src="@/static/images/synthesis/zwdsResult/right.png">
        </view>
      </view>
      <view class="zwds-content">
        {{ziWeiAnalyze.mainStar}}
      </view>
      <view class="zwds-divide">
        <img class="dd-img" src="@/static/images/synthesis/zwdsResult/divide.png">
        <view class="dd-content">
          <img class="dd-deco" src="@/static/images/synthesis/zwdsResult/left.png">
          <view class="dd-title">您的自身状况</view>
          <img class="dd-deco" src="@/static/images/synthesis/zwdsResult/right.png">
        </view>
      </view>
      <view class="zwds-content">
        <view v-if="ziWeiAnalyze.persionAnaly!='nocontent'">
          <view class="zwds-title">个性分析：</view>
          <view>{{ziWeiAnalyze.persionAnaly}}</view>
        </view>
        <view v-if="ziWeiAnalyze.palaceFortune!='nocontent'">
          <view class="zwds-title">福德宫盘：</view>
          <view>{{ziWeiAnalyze.palaceFortune}}</view>
        </view>
        <view v-if="ziWeiAnalyze.palaceSick!='nocontent'">
          <view class="zwds-title">健康建议：</view>
          <view>{{ziWeiAnalyze.palaceSick}}</view>
        </view>
      </view>
      <view class="zwds-divide">
        <img class="dd-img" src="@/static/images/synthesis/zwdsResult/divide.png">
        <view class="dd-content">
          <img class="dd-deco" src="@/static/images/synthesis/zwdsResult/left.png">
          <view class="dd-title">您的家庭情况</view>
          <img class="dd-deco" src="@/static/images/synthesis/zwdsResult/right.png">
        </view>
      </view>
      <view class="zwds-content">
        <view v-if="ziWeiAnalyze.palaceParent!='nocontent'">
          <view class="zwds-title">父母关系：</view>
          <view>{{ziWeiAnalyze.palaceParent}}</view>          
        </view>
        <view v-if="ziWeiAnalyze.palaceChildren!='nocontent'">
          <view class="zwds-title">子女关系：</view>
          <view>{{ziWeiAnalyze.palaceChildren}}</view>
        </view>
        <view v-if="ziWeiAnalyze.palaceBrother!='nocontent'">
          <view class="zwds-title">兄弟关系：</view>
          <view>{{ziWeiAnalyze.palaceBrother}}</view>
        </view>
        <view v-if="ziWeiAnalyze.palaceTianzhai!='nocontent'">
          <view class="zwds-title">田宅家境：</view>
          <view>{{ziWeiAnalyze.palaceTianzhai}}</view>
        </view>
      </view>
      <view class="zwds-divide">
        <img class="dd-img" src="@/static/images/synthesis/zwdsResult/divide.png">
        <view class="dd-content">
          <img class="dd-deco" src="@/static/images/synthesis/zwdsResult/left.png">
          <view class="dd-title">您的运势发展</view>
          <img class="dd-deco" src="@/static/images/synthesis/zwdsResult/right.png">
        </view>
      </view>
      <view class="zwds-content">
        <view v-if="ziWeiAnalyze.palaceConjugal!='nocontent' && ziWeiAnalyze.palaceConjugal!=null">
          <view class="zwds-title">感情运势：</view>
          <view>{{ziWeiAnalyze.palaceConjugal}}</view>          
        </view>
        <view v-if="ziWeiAnalyze.palaceCaibo!='nocontent'">
          <view class="zwds-title">财富运势：</view>
          <view>{{ziWeiAnalyze.palaceCaibo}}</view> 
        </view>
        <view v-if="ziWeiAnalyze.palaceGuanlu!='nocontent'">
          <view class="zwds-title">事业发展：</view>
          <view>{{ziWeiAnalyze.palaceGuanlu}}</view>          
        </view>
        <view v-if="ziWeiAnalyze.palaceMigration!='nocontent'">
          <view class="zwds-title">迁移发展：</view>
          <view>{{ziWeiAnalyze.palaceMigration}}</view>
        </view>
      </view>
		</view>
	</view>
</template>

<script>
	export default {
    name: 'zwdsResult',
    props: {
      userInfo: {},
      result: {}
    },
		data() {
			return {
				hasResult: false,
        name: '',
        sex: '',
        solarTime: '',
			}
		},
    mounted() {
			this.load()
    },
		methods: {
      load() {
        uni.showLoading({
        	title: '加载中'
        });
        if (this.result && this.userInfo){
          let res = this.result;
          this.mingZao = res.mingZao;
          this.tianPan = res.tianPan;
          this.ziWeiAnalyze = res.ziWeiAnalyze;
          uni.hideLoading();
          this.hasResult = true;
        }else{
        	uni.showToast({
        		title: '订单编号不存在',
        		icon: 'none'
        	});
        }
      }
		}
	}
</script>

<style lang="scss" scoped>
.red {
  color: red;
}
.zwds-content-box {
  height: 100%;
}
.notpay {
	background-color: #000000;
	opacity: 0.8;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.notpay-btn {
  width: 481rpx;
  height: 60rpx;
  background-color: #8e5632;
  border-radius: 30rpx;
  font-size: 32rpx;
  font-weight: normal;
  line-height: 59rpx;
  color: #ffffff;
  text-align: center;
}
.result-content {
  box-sizing: border-box;
  width: 100%;
  font-size: 30rpx;
  line-height: 52rpx;
  background-color: #fff;
  .page-header {
    .page-header-img {
      width: 100%;
    }
  }
}
.zwds-divide {
  position: relative;
  .dd-img {
    width: 100%;
    margin-top: 40rpx;
  }
  .dd-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    .dd-title {
      color: #c76b28;
      font-size: 36rpx;
      font-weight: bold;
      padding: 0 10rpx;
    }
    .dd-deco {
      height: 100%;
    }
  }
}
.zwds-content {
  padding: 0 50rpx 90rpx;
}
.zwds-title {
  color: #dd9ec5;
  font-weight: bold;
}
</style>